#+_+ coding:utf-8 +_+

import tornado.web
from common import errno
from common import buffer

class BaseHdl(tornado.web.RequestHandler):

    def signatureError(self):
        msg = dict(errno=errno.ESIGNATURE,errmsg=errno.ErrStr(errno.ESIGNATURE))
        rep = dict(rst="FAILED",msg=msg)
        return buffer.JsonEncode(rep)

    def uidError(self):
        msg = dict(errno=errno.EAUTH_UID_NOTLOGIN,errmsg=errno.ErrStr(errno.EAUTH_UID_NOTLOGIN))
        rep = dict(rst="FAILED",msg=msg)
        return buffer.JsonEncode(rep)

